import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import List from '../views/List.vue'
import Search from '../views/Search.vue'
const routes = [
  {
    path: '/',name: 'root',component: Home
  },
  {
    path: '/search',name: 'search',component: Search
  },
  {
    path: '/detail/:newType/:id',name: 'detail',component: () => import( '../views/Detail.vue')
  },
  {
    path: '/listnotice/:newType',name: 'listnotice',component: () => import( '../views/ListNotice.vue')
  },
  {
    path: '/list/:newType',name: 'list',component: List
  },
  {
    path: '/detailCar/:id',name: 'detailCar',component: () => import( '../views/DetailCar.vue')
  },
  {
    path: '/detailNotice/:id',name: 'detailNotice',component: () => import( '../views/DetailNotice.vue')
  },
  {
    path: '/detailImg/:id',name: 'detailImg',component: () => import( '../views/DetailImg.vue')
  },
  {
    path: '/detailVid/:id',name: 'detailVid',component: () => import( '../views/DetailVid.vue')
  },



]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
